package pg.entity;

import com.google.gson.Gson;
import deepr.anno.Property;
import deepr.anno.Schema;
import deepr.anno.SchemaType;
import deepr.anno.Type;
import lombok.Data;

@Schema(type = SchemaType.PG, name = "asset")
@Data
public class Asset {

    @Property(primaryKey = true, type = Type.LONG)
    private Integer id;
    @Property
    private Integer type;
    @Property
    private Integer assetCategoryId;
    @Property
    private Float amount;
    @Property(type = Type.JsonArray)
    private Gson record;
    @Property(type = Type.JsonArray)
    private Gson record2;
    @Property(type = Type.JSON)
    private Gson info;

    @Property(type = Type.ARRAY)
    private String[] users;

    @Property(schema = AssetCategory.class, forProperty = "assetCategoryId")
    private AssetCategory assetCategory;
}
